#pragma once
#include <iostream>
#include <vector>
#include <stdlib.h>
#include "Node.h"


Position meanShift(SpatialVarianceAggregator& aggregator);
Parameter GetRandomFeature(Random& random);
float GetResponse(const Parameter& feature, const DataPointCollection&data, unsigned int sampleIndex);
double ComputeInformationGain(const SpatialVarianceAggregator& allStatistics,const SpatialVarianceAggregator& leftStatistics,const SpatialVarianceAggregator& rightStatistics);
bool ShouldTerminate(const SpatialVarianceAggregator& parent, const SpatialVarianceAggregator& leftchild, const SpatialVarianceAggregator& rightchild, double gain);